import http from '@/utils/http'

// 查询通用时长卡列表
export function queryTimecardList(params) {
  const url = '/myInformation-management/merchantTimeCard/queryList'
  return http.post(url, params)
}

// 删除通用时长卡
export function deleteMerchantTimeCard(params) {
  const url =
    '/myInformation-management/merchantTimeCard/deleteMerchantTimeCard'
  return http.post(url, params)
}

// 获取该代理商下的所有电站
export function findMerchantStations(params) {
  const url = '/myInformation-management/merchantTimeCard/findMerchantStations'
  return http.post(url, params)
}

// 赠送时长卡
export function persentMerchantTimecard(params) {
  const url =
    '/myInformation-management/merchantTimeCard/presentMerchantTimeCard'
  return http.post(url, params)
}

// 通用时长卡上架-下架
export function updateMerchantTimecardStatus(params) {
  const url =
    '/myInformation-management/merchantTimeCard/updateMerchantTimecardStatus'
  return http.post(url, params)
}

// 新增通用时长卡
export function insertMerchantTimecard(params) {
  const url =
    '/myInformation-management/merchantTimeCard/insert/insertMerchantTimeCard'
  return http.post(url, params)
}

// 通用时长卡详情
export function selectMerchantTimeCardDetail(params) {
  const url =
    '/myInformation-management/merchantTimeCard/selectMerchantTimeCardDetail'
  return http.post(url, params)
}

// 编辑通用时长卡
export function updateMerchantTimeCard(params) {
  const url =
    '/myInformation-management/merchantTimeCard/update/updateMerchantTimeCard'
  return http.post(url, params)
}

// 基本信息查询
export function getMyDetails(params) {
  const url =
    '/myInformation-management/basicInformation-management/getMyDetails'
  return http.post(url, params)
}

// 校验旧手机号
export function checkOldPhone(params) {
  const url =
    '/myInformation-management/basicInformation-management/checkOldPhone'
  return http.post(url, params)
}

// 修改手机号
export function updateMyPhone(params) {
  const url =
    '/myInformation-management/basicInformation-management/updateMyPhone'
  return http.post(url, params)
}

// 更新个人信息
export function updateMyDetails(params) {
  const url =
    '/myInformation-management/basicInformation-management/updateMyDetails'
  return http.post(url, params)
}

// 修改密码
export function modifyPassword(params) {
  const url =
    '/myInformation-management/basicInformation-management/modifyPassword-management/modifyPassword'
  return http.post(url, params)
}

// 查询进件状态
export function applymentMicroGetstate(params) {
  const url =
    '/myInformation-management/basicInformation-management/micro-merchant-applyment/applymentMicroGetstate'
  return http.post(url, params)
}

// 微信小微商户申请进件
export function applymentMicroSubmit(params) {
  // const url =
  // '/user-management/merchant-management/micro-merchant-applyment/queryEcommerceApplyments' // 新版收付通接口
  const url =
    '/myInformation-management/basicInformation-management/micro-merchant-applyment/applymentMicroSubmit' // 旧版小微商户接口
  return http.post(url, params)
}

// 进件文件上传
export function uploadmedia(params) {
  const url =
    '/myInformation-management/basicInformation-management/micro-merchant-applyment/uploadmedia'
  return http.post(url, params)
}
//和能量列表
export function queryAndEnergyList(params) {
  const url = '/myInformation-management/merchantHycEnergy/queryPage'
  return http.post(url, params)
}
//和能量上下架
export function updateAndEnergyStatus(params) {
  const url = '/myInformation-management/merchantHycEnergy/updateStatus'
  return http.post(url, params)
}

// 新增和能量
export function addAndEnergy(params) {
  const url = '/myInformation-management/merchantHycEnergy/insert/addEnergyDef'
  return http.post(url, params)
}
// 编辑和能量
export function editAndEnergy(params) {
  const url =
    '/myInformation-management/merchantHycEnergy/update/updateEnergyDef'
  return http.post(url, params)
}

// 和能量详情
export function queryAndEnergyDetail(params) {
  const url = '/myInformation-management/merchantHycEnergy/update/selectById'
  return http.post(url, params)
}

// 赠送和能量
export function presentAndEnergy(params) {
  const url = '/myInformation-management/merchantHycEnergy/presentAndEnergyCard'
  return http.post(url, params)
}
// 批量赠送和能量
export function batchPresentAndEnergy(params) {
  const url =
    '/myInformation-management/merchantHycEnergy/multiPresentAndEnergyCard'
  return http.post(url, params)
}

// 删除赠送和能量
export function deleteAndEnergy(params) {
  const url = '/myInformation-management/merchantHycEnergy/deleteById'
  return http.post(url, params)
}
